


The Paired Comparison Model

by Bitenomnom



Series: Mathematical Proof [39]
Category: Sherlock (TV)
Genre: (big surprise there), Gen, Kissing, M/M, Mathematics, Sherlock Experiments on John, confusingly timed slapping, foreshadowed beekeeping, wry banter
Language: English
Status: Completed
Published: 2012-11-15
Updated: 2012-11-15
Packaged: 2017-11-18 17:20:49
Rating: Not Rated
Warnings: Creator Chose Not To Use Archive Warnings
Chapters: 1
Words: 2,039
Publisher: archiveofourown.org
Story URL: https://archiveofourown.org/works/563526
Author URL: https://archiveofourown.org/users/Bitenomnom/pseuds/Bitenomnom
Summary: <blockquote class="userstuff">
              <p>Today, a mysterious chart appeared on the refrigerator of 221B.</p><p>John is reasonably certain that Sherlock is not planning on calling for volunteers to come knocking at 221B for some variety of sexual experimentation, although that is very much what the chart on the refrigerator seems to suggest. He is also reasonably certain, however, that whatever it is, it must not involve Sherlock, because the chart on the refrigerator lists quite a few things that John doesn’t imagine Sherlock would ever do of his own free will. </p><p>The real question, then—which John poses to Sherlock after several moments’ silence—is, “When’s the orgy?”</p>
            </blockquote>





	The Paired Comparison Model

**Author's Note:**

> I slipped in a little bit from one of my other classes at the end, which you might recognize from previous stories (I think "Fuzzy Measures" and "The Transposable Choquet Integral" in particular).
> 
> Speaking of fuzzy measures, since I know some of you are or know mathematicians and computer scientists, do any of you know much about how to either prove a recursive algorithm converges, or else prod it to show it diverges? Er -- I mean -- one of my classes has covered that sort of thing so I _should_ know, I guess, but there's this particular one I have to talk about in a presentation next week and I'm trying to figure out its weaknesses. If you want to take a look, [here's the paper about it](http://ikojadin.perso.univ-pau.fr/kappalab/pub/GraICFS1995.pdf). You'll have my eternal gratitude. I might even (will definitely!!) feel so grateful that I'll write you something in return for any assistance you can give me on this matter. :) Let me know if you want my email or some such for further discussion.

The linear model is actually a special case of the more flexible generalized linear models (surprise, surprise). In the linear model, you assume that your expected value depends on some various linear terms. In the generalized version, you have a link function, so that your expected value is actually allowed to be merely some _function_ of linear terms. This link function could be something like the logit function, which is a function that allows for us to transform data between 0 and 1 to data anywhere on the real line. The logit function is

logit(x) = log(x/(1-x))

So if x approaches 0, then logit(x) goes to negative infinity; similarly, if x approaches 1, then logit(x) goes to infinity.

This is handy for binomial responses. We might also want to use the Poisson function as our link function, if maybe our data is based on counting people, so that there is a lower bound but there is no upper bound on the numbers we might get (so it will probably be skewed right!).

The paired comparison model, also known as the Bradley-Terry model, is a type of generalized linear model. This is the sort of model that might be used in ranking sports teams, or in market research asking consumers to rank products. Rather than trying to rank a huge number of items (say, how good 50 different teams are, or how tasty 10 different types of jam are), the approach is instead to look at the items in pairs and determine preferences from there. For instance, if you were asked to rank brands of jam, it would be totally overwhelming to try to rank all ten—if you ask people to do that, you’re going to get lots of unpredictable data. Instead, if you simply had them pick between two, as long as there was some overlap between some of the pairs, it would be much easier to rank the jam brands. Then, we come up with figures for the probability that jam _j_ is preferred over jam _k_ and use the logit function of this probabilty to determine a sort of quantitative difference in quality between the two brands.

 

***

 

 

            Today, a mysterious chart appeared on the refrigerator of 221B.

            It has John the slightest bit concerned.

            “What the hell is this for?” he asks Sherlock, who is currently plucking nonsense on his violin in a key and tempo that John thinks might possibly be designed specifically to drive him completely bonkers.

            He is at least reasonably certain that Sherlock is not planning on, for instance, calling for volunteers to come knocking at 221B for some variety of sexual experimentation, although that is very much what the chart on the refrigerator seems to suggest. Is he going to, what, pair them up and take data? Of course, he’d have to be thorough. He’d have to then pair them up with different people, and different people, and get a hundred or so sets of data, and then use that. John looks deeply into his mug. He is not the slightest bit prepared for any week-long orgy in his flat that does not involve him. (He is probably not prepared for any week-long orgy in his flat that _does_ involve him, for that matter, because that raises a lot of other questions such as _Do I get any say over your sample population, Sherlock?_ with such possible follow-ups as _Curvaceous women, maybe? Yeah, as all nine of the others. For consistency,_ or else the more awkward ones, like, _Are you really gonna make me do_ that _to a bloke?_ )

            He is also reasonably certain, however, that whatever it is, it must not involve Sherlock, because the chart on the refrigerator lists quite a few things that John doesn’t imagine Sherlock would ever do of his own free will. So, the real question—which John poses to Sherlock after several moments’ silence—is, “When’s the orgy?”

            This, at least, stops Sherlock’s prodding at his strings. “What?”

            “You know,” John nods toward the refrigerator. “That.”

            “None of those listings say orgy,” Sherlock says. “Or can’t you read?”

            “Well, no, but obviously these are, er, activities. And obviously this is some experiment of yours. So the question is, who are the subjects? And the answer is, people, because you need people to do these sorts of things, and I know how you are with your experiments, so there’ll be lots of data, requiring lots of people. So, under some questionably loose definitions of the word, when’s the orgy?”

            “Mm,” Sherlock taps his bow against his lips thoughtfully. “Very good deduction, John.”

            “Thanks.”

            “ _Wrong_ , yes. But not without merit.”

            John sighs, rolls his head and his eyes back and then drains the last of his tea from the mug. “What did I get wrong?”

            “Correct: they are activities. Correct: it is an experiment. Incorrect: the subjects are people.”

            “Oh, god,” John buries his face in his hands. “Please tell me you aren’t covering our table with copulating mice.”

            “I—”

            “ _Or_ rats, or hamsters, or crickets or cats or lizards or, or, _birds_ or _bees_.”

            “Bees?” Sherlock asks: quietly, to himself, as if it has inspired an idea.

            John buries his face deeper. “It’s an expression, Sherlock. The birds and the bees?”

            “I’d never put much thought into the copulation procedure of bees,” Sherlock muses to himself.

            “Not on our table, Sherlock.”

            “Of course.” Sherlock taps a rhythm absently against his violin. “Naturally,” he says a moment later, apparently carrying on a conversation in his head.

            “Did you hear me?”

            “What? Yes.”

            “Right, so, okay, you’re going to swear to me right now that you aren’t studying anything having sex on our kitchen table.”

            “Oh,” Sherlock says. “But that’s part of the experiment, John.”

            “Part of the— _Christ_ , Sherlock, are you actually carting home mice to fuck in our flat?”

            “Mice? God, no.”

            “Rabbits?”

            “Nothing new to learn there.”

            “Any kind of animal whatsoever?”

            “Humans count as animals.”

            “But you just said what I got wrong was guessing that it was _people_.”

            “Yes.”

            John rotates in his chair to face Sherlock and stares him in the eye; Sherlock tilts his head quizzically. “Oh, go on,” John says, “you know how much I love it when you’re unbearably opaque.”

            “Oh!” Sherlock leaps up, sets his violin down on his chair. “I hadn’t even thought of listing that one. It didn’t seem…” he trails off, waving his hand about limply, and makes his way over to the chart. He squeezes _wry banter_ into a space over a column at the end.

            “That was sarcasm, by the way,” John says blankly as he squints at the chart, trying to make sense of the latest addition.

            “I’m aware.”

            “Sherlock, for the love of god, will you please just tell me what’s going on? Why have you put ‘wry banter’ on the orgy chart?”

            “It’s not an orgy chart, John.”

            “So help me, if your subject is not people, or any other animal, what the hell is it?”

            “ _A_ person.”

            John sighs. “I guess it was inevitable.”

            “What?”

            “Well, having exhausted all other possibilities except, apparently, breeding bees, you, in your immense and unending boredom, turn to experiments about your own sexuality.”

            “ _My_ —John!” Sherlock huffs. “The subject is _you_.”

            John is baffled, frazzled, distracted, and, finally, quite suddenly, and completely out of the blue, slapped.

            Then, he is wrapped into a hug.

            Sherlock takes a step back.

            John blinks.

            “Which of those did you prefer?”

            John blinks, twice this time. He reaches up to his cheek and rubs the reddening area.

            “John?”

            John stares forlornly at his empty mug. Some tea would be really, really fantastic right now.

            “Certainly you must have a preference.”

            “I really, _really_ need some context here,” John finally manages.

            “Such as?”

            “What the bloody hell was that?”

            Sherlock points to the chart. “Slapping,” he says, and then shifts over to point to a different column, “and hugging. Which do you prefer?”

            “Oh.”

            “Well?”

            “In general, hugging.”

            “Not _in general_. From me.”

            “From you. Uh.” John clears his throat. “Well, it was all a bit odd, really.”

            “So you liked neither? Not even well enough to choose one over the other?”

            “Not really that…” John resumes his previous position of face buried firmly in hands. “Sherlock, what are you doing?”

            “I am attempting to rank your preferred forms of contact with me. Incidentally, you are really not providing any assistance whatsoever right now.”

            “You could _ask_ ,” John suggests.

            Sherlock shrugs. “How can you possibly know? I haven’t done half these things to you.”

            “I think more than half,” John says, and his voice comes out a bit more high-pitched than he’d intended. He clears his throat. “Unless you’ve been drugging me again.”

            “Oh! No. Of course not. Consent is important.” He crosses his arms, stares firmly at the chart as he adds, “Anyway, you can’t specify your preferences to me if you’re not conscious enough at the time to remember the event.”

            “That’s reassuring.” He chances a glance up through his fingers. “You know, though, that you can’t actually make me try all that stuff just so that I’ll rank it for you. I could just, er, I dunno, rank the ones we’ve already got squared away.”

            “Not all at once!” Sherlock exclaims. “The human brain deals much more easily with either-or decisions. How would you decide what to rank eighth versus seventh? That’s ludicrous.”

            “Try me.” John stands to look over the list. “One: wry banter. Two: handshake. Three: uh, ‘appropriately societally masculinized hugging ritual’? Four: er, let’s go with the hugging. And then five: the slapping, although I’d be really concerned if you just walked about doing that to me for lack of ability to do the other four. Er…six…er…footsie? And...no, I think I’ll switch the footsie and the slapping.”

            “You see? Only on six and you’re confused already. Besides,” Sherlock frowns, “you’re only ranking those based on social acceptability for interaction between two males.”

            “Yeah, well,” John says weakly, and then, “I think that’s about the end of the list anyway.”

            “That’s it? John, there are still eighteen other items available to you to rank.”

            “Look, Sherlock, I’m sorry, but I really don’t think you want to look into whether I pre…”

            John stutters to a stop as Sherlock steps in front of him and pushes him back against the refrigerator. Sherlock lowers his mouth onto John’s, gently nibbling, gripping, John’s upper lip, before tentatively lowering his tongue, and lowering his hands to John’s waist as he does so. He dips his head slightly, altering his angle to ask for more, and finally John lets his jaw go slack, sucking in, sherardizing Sherlock’s sharp tongue with his saliva in the heat of his mouth, shoving his hands through Sherlock’s locks.

            Sherlock pulls back slowly, lips clinging to John’s as if they dread letting go. He takes a step back to look John in the eye.

            “Okay,” John says dizzily. He takes a few deep breaths. “I get it.” He wobbles on the balls of his feet, and catches himself against the refrigerator, snatching at its handle, backing up to lean against it.

            Sherlock slaps him.

            John blinks.

            “Item one, or item two?”

            John stares forlornly at Sherlock’s mouth. “One.”

            Sherlock makes a mark on the chart. “Excellent.”

            “Er,” John clears his throat. “We might have to, uh, work our way up to some of those. I don’t make any promises I’ll agree to all of them.”

            “That’s acceptable,” says Sherlock.

            John glances over the list. “You should probably also know that if you do item sixteen to me for comparison right after we do item eleven, you _will_ be shot.”

            “Oh.” Sherlock looks at the numbers, and nods to himself. “Noted. Anything else?”

            “Hm,” John scans the chart. “On the other hand, if you do eight and then thirteen the results would probably rather…er…additive. So that might throw off your experiment.”

            “You mean superadditive, I assume.” He raises an eyebrow at John’s confusion. “You know—‘the whole is greater than the sum of its parts’?”

            “Oh. Uh. Yeah. That one.”

            “Hm,” Sherlock tilts his head. “Eight and thirteen, you say?”          

            John flushes.

            “Interesting.”

**Author's Note:**

> Continued in [Paired Comparison Experiment Notes, Trials 1-24](http://archiveofourown.org/works/564495).


End file.
